import service from '@/utils/request';

export const list = (param) => {
    return service.get('pageBlogs', { params: param })
}

export const getBlogList = (param) => {
    return service.get('blogs', { params: param })
}

export const getBlog = (id) => {
    return service.get(`/blog/${id}`);
}

export const total = (param) => {
    return service.get('/blog/total', { params: param });
}

export const recom = (param) => {
    return service.put('/blogs/recom', param, {
        'Content-Type': 'application/json;charset=UTF-8'
    });
}
export const blogDelete = (id) => {
    return service.delete(`/blog/${id}`);
}
